package top.eggcode.modules.user.store;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.support.JpaRepositoryImplementation;
import org.springframework.stereotype.Repository;
import top.eggcode.modules.user.model.PowerEntity;

import java.util.List;

/**
 * Title:
 * Description: TODO
 * Date: 2021/4/12 14:33
 *
 * @author JiaQi Ding
 * @version 1.0
 */
@Repository
public interface PowerRepository extends JpaRepositoryImplementation<PowerEntity, String> {


    /**
     * 查询菜单和页面
     *
     * @return 权限列表
     */
    @Query("select p from PowerEntity p where p.type = 1 or p.type = 2")
    List<PowerEntity> selectMenuList();
}
